package com.wenhua.pojo;
public class User {
    // 私有字段，封装数据
    private Integer userId;
    private String username;
    private String password;
    private Integer userPermission;

    // 构造方法
    public User() {
        // 无参构造方法
    }

    public User(Integer userId, String username, String password, Integer userPermission) {
        this.userId = userId;
        this.username = username;
        this.password = password;
        this.userPermission = userPermission;
    }

    // getter和setter方法
    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getUserPermission() {
        return userPermission;
    }

    public void setUserPermission(Integer userPermission) {
        this.userPermission = userPermission;
    }

    // 可选：toString方法，便于打印对象信息
    @Override
    public String toString() {
        return "User{" +
                "userId=" + userId +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' + // 注意：在生产环境中，密码不应直接打印或暴露
                ", userPermission=" + userPermission +
                '}';
    }
}